[PM-32477]PremiumStatusChanged Push Notification#7198
Conversation
|
New Issues (2)Checkmarx found the following issues in this Pull Request
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7198 +/- ##
=======================================
Coverage 57.69% 57.69%
=======================================
Files 2035 2036 +1
Lines 89672 89755 +83
Branches 7993 7997 +4
=======================================
+ Hits 51738 51788 +50
- Misses 36074 36106 +32
- Partials 1860 1861 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/Billing/Services/Implementations/PaymentSucceededHandler.cs
Outdated
Show resolved
Hide resolved
src/Billing/Services/Implementations/SubscriptionDeletedHandler.cs
Outdated
Show resolved
Hide resolved
src/Billing/Services/Implementations/SubscriptionUpdatedHandler.cs
Outdated
Show resolved
Hide resolved
src/Billing/Services/Implementations/SubscriptionUpdatedHandler.cs
Outdated
Show resolved
Hide resolved
src/Core/Billing/Premium/Commands/CreatePremiumCloudHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
src/Core/Billing/Premium/Commands/CreatePremiumSelfHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
src/Core/Models/PushNotification.cs
Outdated
| public Guid TargetOrganizationUserId { get; set; } | ||
| } | ||
|
|
||
| public class PremiumStatusPushNotification |
There was a problem hiding this comment.
❌ Please review the comments on lines 7 and 8 of this file regarding the location this file should live in.
There was a problem hiding this comment.
@cyprain-okeke This still needs to be addressed - the location of the file should be owned to a location we own per the comments at the top of the file.
djsmith85
left a comment
There was a problem hiding this comment.
It seems like after the comments from @amorask-bitwarden are addressed, a review from platform might not be necessary anymore. In case they do, please re-request a review.
amorask-bitwarden
left a comment
There was a problem hiding this comment.
Thanks for resolving the feedback - just one thing was missed and then we're good to go.
src/Core/Models/PushNotification.cs
Outdated
| public Guid TargetOrganizationUserId { get; set; } | ||
| } | ||
|
|
||
| public class PremiumStatusPushNotification |
There was a problem hiding this comment.
@cyprain-okeke This still needs to be addressed - the location of the file should be owned to a location we own per the comments at the top of the file.
|





🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-32477
📔 Objective
Summary
Implement premium-status push notifications across billing flows so clients stay in sync whenever a user’s premium state changes.
Details
New adapter API for premium changes
Stripe payment and subscription handlers
SubscriptionDeletedHandler
SubscriptionUpdatedHandler
Premium subscription commands
CreatePremiumCloudHostedSubscriptionCommand
CreatePremiumSelfHostedSubscriptionCommand
After writing the license and saving the user, call PushPremiumStatusChangedAsync(user) to broadcast the new premium status for self-hosted subscriptions.
UpgradePremiumToOrganizationCommand
Tests
Update billing service tests to:
Update premium command tests to:
📸 Screenshots